cmake_minimum_required(VERSION 2.8)

PROJECT (client)

# set(OpenCV_DIR "/usr/local/share/OpenCV")
set(CMAKE_CXX_STANDARD 11)
find_package(OpenCV  REQUIRED)
find_package(Threads REQUIRED)
## load in pkg-config support
find_package(PkgConfig)
## use pkg-config to get hints for 0mq locations
pkg_check_modules(PC_ZeroMQ QUIET zmq)

## use the hint from above to find where 'zmq.hpp' is located
find_path(ZeroMQ_INCLUDE_DIR
        NAMES zmq.hpp
        PATHS ${PC_ZeroMQ_INCLUDE_DIRS}
        )

## use the hint from about to find the location of libzmq
find_library(ZeroMQ_LIBRARY
        NAMES zmq
        PATHS ${PC_ZeroMQ_LIBRARY_DIRS}
        )


include_directories(${OpenCV_INCLUDE_DIRS} ${ZeroMQ_INCLUDE_DIR} ${CMAKE_BINARY_DIR}/client_server_interface)
ADD_EXECUTABLE (client client.cpp)

target_link_libraries(client ${OpenCV_LIBS} ${ZeroMQ_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} clientServerInterface)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)

